#!perl

use strict;
use Getopt::Long;
use MaterialsScript qw(:all);

my $doc = Documents->Import("MFI_Dio_48_Fur_12.xtd");

my $NumberOfMolecules = $doc->UnitCell->Molecules->Count;
my @mol;

for (my $i =0; $i < $NumberOfMolecules; ++$i){
        my $molecule = $doc->UnitCell->Molecules($i);
                my $atoms = $molecule->Atoms;
                push @mol,$atoms;
}

$doc->CreateSet("Molecule", \@mol);


my $resultsA = Modules->Forcite->Analysis->SpaceTimeCorrelationFunction($doc, Settings(
	STCFSetA => "Molecule", 
	STCFFrameOriginStep => 200, 
	STCFMaxFrameLength => 99.99, 
	STCFCutoff => 20));
my $outSelfSTCFChartA = $resultsA->SelfSTCFChart;
my $outSelfSTCFChartAsStudyTableA = $resultsA->SelfSTCFChartAsStudyTable;
my $outDistinctSTCFChartA = $resultsA->DistinctSTCFChart;
my $outDistinctSTCFChartAsStudyTableA = $resultsA->DistinctSTCFChartAsStudyTable;


